#include <stdio.h>

int main() {
	int m = 0;
	scanf("%d", &m);
	for (int i = 2; i <= m; i++) {
		while (m % i == 0) {
			printf("%d ", i);
			m = m / i;
		}
	}
	return 0;
}